package io.renren.modules.user.service.impl;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.user.dao.TNomalDictionalDao;
import io.renren.modules.user.entity.TNomalDictionalEntity;
import io.renren.modules.user.service.TNomalDictionalService;


@Service("tNomalDictionalService")
public class TNomalDictionalServiceImpl extends ServiceImpl<TNomalDictionalDao, TNomalDictionalEntity> implements TNomalDictionalService {

    @Autowired
    private TNomalDictionalDao tNomalDictionalDao;

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TNomalDictionalEntity> page = this.page(
                new Query<TNomalDictionalEntity>().getPage(params),
                new QueryWrapper<TNomalDictionalEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public List<TNomalDictionalEntity> listDictional() {
        List<TNomalDictionalEntity> typeList = tNomalDictionalDao.listDictional();
        return typeList;
    }

}